<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>register.jsp</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<script type="text/javascript" src="<%=basePath %>demo/js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="<%=basePath %>demo/js/Validform_v5.3.2_min.js"></script>

	<link rel="stylesheet" href="<%=basePath %>demo/css/style.css" type="text/css" media="all" />
<link href="demo/css/demo.css" type="text/css" rel="stylesheet" />
<style>
.registerform li{padding-bottom:20px;padding-left: 50px;}
.Validform_checktip{margin-left:10px;}
.registerform .label{display:inline-block; width:100px;}
.action{padding-left:92px; style="text-align: center"}
</style>

  </head>
  
  <body  >
  
  <div class="main" >
    <div class="wraper" style="padding-left: 400" >
        
    	<h2 style="width: 500;text-align: center">请填写用户信息</h2>
        <form class="registerform" action="customer/detail.jsp" method="post">
            <ul>
                <li>
                    <label class="label"><span class="need">*</span> 用户名：</label>
                    <input type="text" name="uname" class="inputxt"   ajaxurl="user/userAction_checked"/>
                </li>
                <li>
                    <label class="label"><span class="need">*</span> 密码：</label>
                    <input type="password" name="upassword" class="inputxt" />
                </li>
                <li>
                    <label class="label"><span class="need">*</span> 确认密码：</label>
                    <input type="password" class="inputxt" />
                </li>
                 <li>
                    <label class="label"><span class="need">*</span>真实姓名：</label>
                    <input type="text" name="urname" class="inputxt" />
                </li>
                 <li>
                    <label class="label"><span class="need">*</span>E-mail：</label>
                    <input type="text" name="uemail" class="inputxt" />
                </li>
                
                 <li>
                    <label class="label"><span class="need">*</span> 密码提问：</label>
                    <input type="text"  name="usolution" class="inputxt" />
                </li> 
                <li>
                    <label class="label"><span class="need">*</span> 密码答案：</label>
                    <input type="text" name="uanswer" class="inputxt" />
                </li>
            </ul>
            <div class="action" >
                <input type="submit" value="提 交信息" /> <input type="reset" value="重 置" />
            </div>
        </form> 
    </div>
</div>

<script type="text/javascript">
$(function(){
	//$(".registerform").Validform();  //就这一行代码！;
		
	var demo=$(".registerform").Validform({
		tiptype:3,
		label:".label",
		showAllError:true,
		datatype:{
			"zh1-6":/^[\u4E00-\u9FA5\uf900-\ufa2d]{1,6}$/
		}
		
	});
	
	//通过$.Tipmsg扩展默认提示信息;
	//$.Tipmsg.w["zh1-6"]="请输入1到6个中文字符！";
	demo.tipmsg.w["zh1-6"]="请输入1到6个中文字符！";
	
	demo.addRule([{
		ele:".inputxt:eq(0)",
		datatype:"zh2-5"
	},
	{
		ele:".inputxt:eq(1)",
		datatype:"*6-20"
	},
	{
		ele:".inputxt:eq(2)",
		datatype:"*6-20",
		recheck:"upassword"
	},
	{
	ele:".inputxt:eq(3)",
	datatype:"zh2-4"
},
{
ele:".inputxt:eq(4)",
datatype:"e"
},
{
ele:".inputxt:eq(5)",
datatype:"*3-20"
},
{
ele:".inputxt:eq(6)",
datatype:"*3-20"
},
	{
		ele:"select",
		datatype:"*"
	},
	{
		ele:":radio:first",
		datatype:"*"
	},
	{
		ele:":checkbox:first",
		datatype:"*"
	}]);
	
})
</script>
    
  </body>
</html>
